{% extends 'base/base.html' %}

{% block title %}
    搜索结果
{% endblock %}

 {% block main %}
     {% if query %}
        <h3>搜索结果如下：</h3>
        {% for result in page.object_list %}
            <a href="{% url 'main:article_detail' result.object.id %}">  {{result.object.title}} </a><br/>
        {% empty %}
            <p>啥也没找到</p>
        {% endfor %}
    {% endif %}
 {% endblock %}